import QtQuick 2.6
import QtQuick.Layouts 1.2

import "Base/UiBase"
import "Base/Config"

Rectangle {
    id: root
    property string page // "evaluation", "discover", "tc", "personal"

    width: parent.width
    height: 96 * Size.ratio
    color: Color.foreground
    RowLayout {
        anchors.fill: parent
        spacing: 0

        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true
            ImageButton {
                anchors.centerIn: parent
                width: 180 * Size.ratio
                height: 96 * Size.ratio
                source: page == "evaluation" ? "../resources/menu/dianping_02.svg" : "../resources/menu/dianping_01.svg"
                onClicked: page = "evaluation"
            }
        }

        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true
            ImageButton {
                anchors.centerIn: parent
                width: 180 * Size.ratio
                height: 96 * Size.ratio
                source: page == "discover" ? "../resources/menu/faxian_02.svg" : "../resources/menu/faxian_01.svg"
                onClicked: page = "discover"
            }
        }

        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true
            ImageButton {
                anchors.centerIn: parent
                width: 180 * Size.ratio
                height: 96 * Size.ratio
                source: page == "tc" ? "../resources/menu/tequan_02.svg" : "../resources/menu/tequan_01.svg"
                onClicked: page = "tc"
            }
        }
        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true
            ImageButton {
                anchors.centerIn: parent
                width: 180 * Size.ratio
                height: 96 * Size.ratio
                source: page == "personal" ? "../resources/menu/me_02.svg" : "../resources/menu/me_01.svg"
                onClicked: page = "personal"
            }
        }
    }
}
